<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .container{
            border: 2px solid green;
            position: relative;
        }
        nav{
            border: 2px solid pink;
            position: absolute;
            left: 0px;
            width:200px;
            height: 200px;
        }
        section{
            border: 2px solid yellow;
            margin-left: 207px;
        }
        footer{
            border: 2px solid green;
            position: fixed;
            bottom: 0;
            left: 0;
            height: 70px;
            background-color: white;
            width: 100%;
        }
        body{
            margin-bottom: 120px;
        }
    </style>
</head>
<body>
    <div class="container">
        <nav>
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">Taco Menu</a></li>
                <li><a href="#">Draft List</a></li>
                <li><a href="#">Hours</a></li>
                <li><a href="#">Directions</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </nav>
        <section>section 的 margin-left 样式确保了有足够的空间容纳 nav 元素。</section>
        <section>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus imperdiet, nulla et dictum interdum, nisi lorem egestas odio, vitae scelerisque enim ligula venenatis dolor. Maecenas nisl est, ultrices nec congue eget, auctor vitae massa. Fusce luctus vestibulum augue ut aliquet. Mauris ante ligula, facilisis sed ornare eu, lobortis in odio. Praesent convallis urna a lacus interdum ut hendrerit risus congue. Nunc sagittis dictum nisi, sed ullamcorper ipsum dignissim ac. In at libero sed nunc venenatis imperdiet sed ornare turpis. Donec vitae dui eget tellus gravida venenatis. Integer fringilla congue eros non fermentum. Sed dapibus pulvinar nibh tempor porta. Cras ac leo purus. Mauris quis diam velit.</section>
        <section>注意观察当你调整浏览器窗口时发生了什么。效果很赞！</section>
    </div>
    <footer>
        如果你使用了一个固定定位的页眉或页脚，确保有足够的空间来显示它们！我在 body 上面加了 margin-bottom 。
    </footer>
</body>
</html>